/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.hazard.chemical.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 重大危险源内危化品情况
 *
 * @author daijie
 * @date 2023-11-10 10:28:04
 */
@Data
@TableName("haz_hazard_chemical")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "重大危险源内危化品情况")
public class HazHazardChemicalEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 模块 hazard.重大危险源 process.危险工艺
     */
    @Schema(description = "模块 hazard.重大危险源 process.危险工艺")
    private String module;

    /**
     * 危险源标识
     */
    @Schema(description = "危险源标识")
    private Long hazId;

    /**
     * 企业危化品SDS标识
     */
    @Schema(description = "企业危化品SDS标识")
    private Long sdsId;

    /**
     * CAS号
     */
    @Schema(description = "CAS号")
    private String casNo;

    /**
     * 危化品MSDS标识
     */
    @Schema(description = "危化品MSDS标识")
    private Long msdsId;

    /**
     * 危险化学品名称
     */
    @Schema(description = "危险化学品名称")
    private String chemicalName;

	/**
	 * 别名
	 */
	@Schema(description = "别名")
	private String alias;

    /**
     * 化学品类型
     */
    @Schema(description = "化学品类型")
    private String chemicalType;

	/**
	 * 主要用途
	 */
	@Schema(description = "主要用途")
	private String mainUsage;

    /**
     * 危险性类别
     */
    @Schema(description = "危险性类别")
    private String hazardCategoryDesc;

    /**
     * 是否重点监管危化品
     */
    @Schema(description = "是否重点监管危化品")
    private String supervisionFlag;

    /**
     * 操作温度
     */
    @Schema(description = "操作温度")
    private BigDecimal operateTemp;

    /**
     * 操作压力
     */
    @Schema(description = "操作压力")
    private BigDecimal operatePressure;

    /**
     * 单元内实际存量
     */
    @Schema(description = "单元内实际存量")
    private BigDecimal actualStock;

    /**
     * 临界量
     */
    @Schema(description = "临界量")
    private BigDecimal criticalStock;

    /**
     * 单个容器最大存量
     */
    @Schema(description = "单个容器最大存量")
    private BigDecimal maxStock;

    /**
     * 物理状态
     */
    @Schema(description = "物理状态")
    private String physicalState;

    /**
     * 描述
     */
    @Schema(description = "描述")
    private String remarks;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private Long orgId;

    public String getChemicalTypeStr() {
        return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.hazard_chemical_type, this.chemicalType);
    }
}
